<template>
	<cxView @confirm="goodsClick(model)" position="relative">
		<u-lazy-load threshold="-450" border-radius="10" :image="model.image" :index="model.index"></u-lazy-load>
		<!-- 题目 -->
		<cxView margin="0 10rpx">
			<cxText>{{model.title}}</cxText>
		</cxView>
		<!-- 价格 -->
		<cxView display="flex" justifyContent="space-between" borderBottom="2rpx dashed #999999" height="80"
			alignItems="center" marginLeft="10" marginRight="10">
			<cxView>
				<cxText fontWeight="600">￥200</cxText>
			</cxView>
			<cxView padding="4rpx 10rpx" background="#f2f5f9" marginRight="6" borderRadius="25" size="24"
				color="#666666">已售:100</cxView>
		</cxView>
		<!-- 店名 -->
		<cxView display="flex" justifyContent="space-between" height="80" alignItems="center" margin="0 10rpx">
			<cxView display="flex" alignItems="center">
				<cxImg src="search" width="30" height="30"></cxImg>
				<cxView overflow="hidden" height="40">{{model.shop}}</cxView>
			</cxView>

			<cxView>
				<cxImg src="search" width="50" height="30"></cxImg>
			</cxView>
		</cxView>
		<!-- 悬浮按钮 -->
		<cxView position="absolute" right="10" top="10" width="80" height="80" borderRadius="40" display="flex"
			justifyContent="center" alignItems="center">
			<cxImg :src="model.isSelect?'/static/system-Ico-collected.png':'/static/system-Ico-collect.png'" width="60"
				height="60"></cxImg>
		</cxView>

	</cxView>
</template>

<script>
	export default {
		name: "productCell",
		data() {
			return {

			};
		},
		props: {
			model: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		methods: {

			goodsClick(e) {
				uni.navigateTo({
					url: '/pages/home/goodsDetail/goodsDetail'
				})

				// this.$emit("cellClick",e);
			}
		}
	}
</script>

<style lang="scss">

</style>